G_BEGIN_DECLS
-#define ot_clear_hashtable(a_v) do { \
- if (*a_v) \
- g_hash_table_unref (*a_v); \
- *a_v = NULL; \
- } while (0);
-
GVariant *ot_gvariant_new_bytearray (const guchar *data,
gsize len);
g_free (pull_data->remote_name);
if (pull_data->base_uri)
soup_uri_free (pull_data->base_uri);
- ot_clear_hashtable (&pull_data->file_checksums_to_fetch);
+ g_clear_pointer (&pull_data->file_checksums_to_fetch, (GDestroyNotify) g_hash_table_unref);
g_clear_pointer (&pull_data->cached_meta_pack_indexes, (GDestroyNotify) g_ptr_array_unref);
g_clear_pointer (&pull_data->cached_data_pack_indexes, (GDestroyNotify) g_ptr_array_unref);
if (summary_uri)
g_hash_table_insert (commits, g_variant_ref (serialized_key), serialized_key);
}
- ot_clear_hashtable (&objects);
+ g_clear_pointer (&objects, (GDestroyNotify) g_hash_table_unref);
g_print ("Verifying content integrity of %u commit objects...\n",
(guint)g_hash_table_size (commits));